<template>
  <div id="centerLeft">
    <div class="left-content01">
      <div class="content01-hander row1-title">咨询分类</div>
      <div class="content-item">
        <div class="content-itemleft">
          <div class="content-itemleft-box" v-for="item in left_content02" :key="item.id">
            <div class="content-itemleft-img" v-if="item.id == 1">
              <img src="../../../public/imgs/ssaasa.png" alt="">
            </div>
            <div class="content-itemleft-img" v-if="item.id == 2">
              <img src="../../../public/imgs/fdsfdsfds.png" alt="">
            </div>
            <div>
              <div class="content-itemleft-title">{{ item.title }}</div>
              <div class="content-itemleft-text" :style="{ color: item.color }">
                {{ item.num }} 件
              </div>
            </div>

          </div>
        </div>
        <div class="content-item-right">
          <div class="charts">
             <LvyouKe2></LvyouKe2>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import LvyouKe2 from "../PageOneDialog/LvyouKe2.vue";
export default {
  data() {
    return {
      left_content02: [
        { id:1, title: "案例库资源数", num: 500, color: "#0ec0f6" },
        {id:2,  title: "已成功解决问题", num: 1200, color: "#fad1a0" },
      ],
      detail: false,
    };
  },
  created() {
    this.fetchData();
  },
  components: {
    LvyouKe2
  },
  mounted() { },
  methods: {
    flow() {
      this.detail = true;
      this.title = "";
    },
    close() {
      this.detail = false;
    },
    async fetchData() {
      try {
        const response = await this.$axios.post("/api/survey/case");
        const data = response.data.data.overview;
        this.left_content02 = data;
      } catch (error) {
        console.error(error);
      }
    },
  },
};
</script>

<style lang="scss" scoped>
$box-width: 572px;
$box-height: 322px;

#centerLeft {
  position: relative;
  height: $box-height;
  width: $box-width;

  .left-content01 {
    width: 100%;
    height: 100%;
    background-image: url("/public/imgs/LeftTwo.png");
    background-repeat: no-repeat;
    background-size: cover;
  }

  .content01-hander {
    background: linear-gradient(to bottom, #ffffff, #97cdff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    height: 58px;
    font-family: Adobe Heiti Std;
    font-weight: 600;
    font-size: 20px;
    color: #ffffff;
    display: flex;
    align-items: center;
    color: #fff;
    padding-left: 60px;
    line-height: 56px;
  }

  .content-item {
    margin-top: 10px;
  }

  .content-item-right {
    margin-left: 30px;
    $box-width: 572px;
    $box-height: 200px;

  }

  .content-itemleft {
    width: 400px;
    height: 49px;
    margin-left: 20px;
    display: flex;

    .content-itemleft-img {
      width: 48px;
      height: 46px;

      img {
        width: 100%;
        height: 100%;
      }
    }

    .content-itemleft-box {
      width: 195px;
      height: 49px;
      margin-top: 5px;
      margin-left: 30px;
      display: flex;
    }

    .content-itemleft-title {
      margin-top: 5px;
      width: 150px;
      height: 24px;
      color: #fff;
      font-size: 15px;
      text-align: left;
    }

    .item-left-box>.item-left-text:last-child {
      margin-bottom: 0;
    }

    .content-itemleft-text {
      width: 145px;
      height: 40px;
      text-align: left;
      font-size: 20px;
      font-weight: 700;
      animation: textAnimation 2s infinite;
      color: #43AEFE;
    }
  }
}
</style>
